<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>index</title>
</head>
<body>
<span th:text="${msg}"></span>
<h1>index</h1>
<div shiro:guest="true"><!--登录成功后将登录消失-->
    <h3><a th:href="@{/tologin}">登录</a></h3>
</div>

<div shiro:hasPermission="'user:add'">
    <h3><a th:href="@{/user/add}">add</a></h3>
</div>

<div shiro:hasPermission="'user:update'">
    <h3><a th:href="@{/user/update}">update</a></h3>
</div>

</body>
</html>